#!/usr/local/bin/python
#-*- encoding:utf-8 -*- 
 
from whoosh.index import open_dir  
from whoosh.fields import *  
from whoosh import qparser;
#from whoosh.analysis import RegexAnalyzer  
#analyzer = RegexAnalyzer(ur"([\u4e00-\u9fa5])|(\w+(\.?\w+)*)")
from whoosh.collectors import TimeLimitCollector, TimeLimit

ix = open_dir('IndexDir/BackupIndex'); 


with ix.searcher() as searcher:
    for hit in searcher.documents(appid=sys.argv[1]):
        print hit['appid'], hit['content'].encode('utf-8'), hit['description'].encode('utf-8');
